﻿using System;
using System.Configuration;
using System.Reflection;

namespace devtm.Editor.Configuration.Data
{
    public class TemplateInteger: ConfigProperty
    {

        public TemplateInteger() { }

        public TemplateInteger(PropertyInfo propertyinfo, ElementSection instance) : base(propertyinfo, instance)
        {
            
        }

        /// <summary>
        /// Runs the editor.
        /// </summary>
        public override void RunEditor() { }

        public override void Selector()
        {
            
        }

        public override void Validator(Object o)
        {
            int k = 0;
            if (int.TryParse(o.ToString(), out k))
                base.Validator(k);
            else
            {
                base.Validator(String.Empty);
            }

        }

    }
}
